<template>
<div>
  <p>请输入评价内容<input type="text"></p>
  <button @click="add">提交</button>
  <br>
  <table>
    <tr v-for="i in shoplist">
      <td>{{i.comment}}</td>
    </tr>
  </table>
</div>
</template>

<script>
export default {
  name: "X_comment",
  data(){
    return{
      form:{'user':localStorage.getItem('userid'),'shop':this.$route.query.id},
      shoplist:{},
    }
  },
  methods:{
    add(){
      this.$axios.post('users/xshopm/',this.form)
    },
    get_shoplist(){
      this.$axios.get('users/xshopm/')
        .then(res=>{
          console.log(res.data)
          this.shoplist=res.data.list
        })
    },
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>
